package com.goldcn.enumeration;

/**
 * Created by Administrator on 2016/8/24.
 */
public enum ErrorCodeEnum {

    PaymentException("011", "付款单异常"),
    PaymentDetailCreatFailure("012", "付款子单生成失败"),
    parmError("011", "code参数不正确"),
    countVisitorNumFailure("010", "访客数查询失败"),
    role_userbangdingFailure("009", "角色绑定用户失败"),
    roleisBindingUsers("008", "已有用户绑定此角色"),
    rolenameisExist("006", "角色名已存在"),
    handleClassifyFailure("005", "品类失败"),//5 操作品类失败
    Classiyf_re_Color_Again("004", "已有品类与成色关联"),//4
    noShopGoldPriceInfo("003", "门店无此金价信息"),//3
    setGoldPrice_Again("002", "门店已对成色设置金价"),//2
    parmIsNull("001", "参数为空"),
    batchUploadFailure("006","文件上传失败"),
    imageMeasureError("005","图片长或宽小于414px"),
    saveLocalFolderFailure("004","文件上传失败"),
    otherError("003","文件上传失败"),
    imageTooLarge("002","图片大小超过5M"),
    imageTypeError("001","文件图片类型出错"),

    videoTooLarge("101","视频大小超过50M"),
    videoTypeError("102","文件视频类型出错");

    private String errorCode;

    private String errorMsg;

    ErrorCodeEnum(String errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public static ErrorCodeEnum stateOf(String index) {
        for (ErrorCodeEnum errorCodeEnum2 : values()) {
            if (errorCodeEnum2.getErrorCode().equals(index)) {
                return errorCodeEnum2;
            }
        }
        return null;
    }


}
